home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / WINDOWS / ALTD201A.ZIP / EXMFC.ZIP / EXAMPLES.MFC / EX04MFC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-19  |  2.4 KB  |  94 lines

  1. //
  2. // EX04MFC.CPP  - Component of MFC Example Program 04
  3. //
  4. //  C++/DOS Example program for ArchiveLib 2.0
  5. //
  6. //  Copyright (c) Greenleaf Software, Inc. 1996
  7. //  All Rights Reserved
  8. //
  9. // MEMBERS/FUNCTIONS DEMONSTRATED
  10. //
  11. //   None in this file.
  12. //
  13. // DESCRIPTION
  14. //
  15. //  This file is unchanged from the default file created by AppWizard.
  16. //
  17. // REVISION HISTORY
  18. //
  19. //  March 18, 1996    2.01A : First release
  20. //
  21.  
  22. // ex04mfc.cpp : Defines the class behaviors for the application.
  23. //
  24.  
  25. #include "ex04std.h"
  26. #include "ex04mfc.h"
  27. #include "ex04dlg.h"
  28.  
  29. #ifdef _DEBUG
  30. #define new DEBUG_NEW
  31. #undef THIS_FILE
  32. static char THIS_FILE[] = __FILE__;
  33. #endif
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CEx04mfcApp
  37.  
  38. BEGIN_MESSAGE_MAP(CEx04mfcApp, CWinApp)
  39.     //{{AFX_MSG_MAP(CEx04mfcApp)
  40.         // NOTE - the ClassWizard will add and remove mapping macros here.
  41.         //    DO NOT EDIT what you see in these blocks of generated code!
  42.     //}}AFX_MSG
  43.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  44. END_MESSAGE_MAP()
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CEx04mfcApp construction
  48.  
  49. CEx04mfcApp::CEx04mfcApp()
  50. {
  51.     // TODO: add construction code here,
  52.     // Place all significant initialization in InitInstance
  53. }
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56. // The one and only CEx04mfcApp object
  57.  
  58. CEx04mfcApp theApp;
  59.  
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CEx04mfcApp initialization
  62.  
  63. BOOL CEx04mfcApp::InitInstance()
  64. {
  65.     // Standard initialization
  66.     // If you are not using these features and wish to reduce the size
  67.     //  of your final executable, you should remove from the following
  68.     //  the specific initialization routines you do not need.
  69.  
  70. #ifdef _AFXDLL
  71.     Enable3dControls();            // Call this when using MFC in a shared DLL
  72. #else
  73.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  74. #endif
  75.  
  76.     CEx04mfcDlg dlg;
  77.     m_pMainWnd = &dlg;
  78.     int nResponse = dlg.DoModal();
  79.     if (nResponse == IDOK)
  80.     {
  81.         // TODO: Place code here to handle when the dialog is
  82.         //  dismissed with OK
  83.     }
  84.     else if (nResponse == IDCANCEL)
  85.     {
  86.         // TODO: Place code here to handle when the dialog is
  87.         //  dismissed with Cancel
  88.     }
  89.  
  90.     // Since the dialog has been closed, return FALSE so that we exit the
  91.     //  application, rather than start the application's message pump.
  92.     return FALSE;
  93. }
  94.